
class DataRealtimeStability(object):

    def __init__(self,_coefficient):
        self.caleList = []
        self.coefficient = _coefficient
        
    def AppendData(self,data):
        value = 0.0
        if(len(self.caleList) == 0):
            value = data
        else:
            value = data - (data - self.caleList[len(self.caleList) - 1]) * self.coefficient

        self.caleList.append(value)
        return round(value,3)
